Public Class changepin
    Inherits System.Web.UI.Page
    'Protected WithEvents TheHeader1 As adm_header
    Public Msg, cid, vid, uid, s, strHtml, NotifyMsg As String
    Public aUserSession(13) As String
    'Public oUtils As utils
    Public oTerminals As Array
#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        'TheHeader1.whichpage = 22
        'TheHeader1.pageid = "findusers"
        'TheHeader1.helpaid = ""
        'TheHeader1.iMenuLevel = 9
        'aUserSession = TheHeader1.security()
        'TheHeader1.StartInterface(22)


        'cid = safestring(Request("cid"))

        'cid = Application("CompanyID")

        'If Request("vid").count > 0 Then
        '    vid = safestring(Request("vid"))
        '    uid = safestring(Request("uid"))
        'Else
        '    vid = aUserSession(cVIAKLIX_ID)
        '    uid = aUserSession(cUSER_ID)
        'End If
        'Msg = ""
        'NotifyMsg = ""

    End Sub
    Private Sub GetuserTerminal()
        'oTerminals = CreateObject("viaUserManagement.UserManagement")
        'oTerminals.DBConnectString = Application("DSN")
        'aTerminals = oTerminals.GetUserTerminals(uid, vid, CInt(cid))

        'oTerminals = Nothing
        '        <%
        '	for i = 0 to ubound(aTerminals) - 1 step 1%>

        '			strHtml="<form action="adm_changepin.asp" method="post">"
        '			<tr><td nowrap valign="top">
        '			<font face="arial" size="2"><%=aTerminals(i,0)%>
        '			</font>
        '			</td><td nowrap valign="top">
        '			<font face="arial" size="2"><%=aTerminals(i,3)%>
        '			</font>
        '			</td><td nowrap valign="top">
        '			<font face="arial" size="2"><%=aTerminals(i,1)%>
        '			<input type="hidden" name="pin" value="<%=aTerminals(i,1)%>" size="4" maxlength="4">

        '        	</font>
        '			</td>

        '			<td nowrap valign="top">
        '			<% if aTerminals(i,4) = "I" then
        '            printname = "Internet Order"
        '			elseif aTerminals(i,4) = "R" then
        '            printname = "Retail Order"
        '			elseif aTerminals(i,4) = "M" then
        '            printname = "MO/TO"
        '			else
        '            printname = "Unknown"
        '			end if%>

        '			<font face="arial" size="2"><%=printname%>
        '			</font>
        '			</td><td nowrap>
        '			<select name="length">
        '			<option value="6">six characters</option>
        '			<option value="5">five characters</option>
        '			<option value="4">four characters</option>
        '			</select>
        '			</td><td nowrap>
        '			<select name="type">
        '			<option value="Numpin">numeric</option>
        '			<option value="alphnum">alphanumeric</option>
        '			</select>
        '			</td><td nowrap>
        '			<!--<input type="hidden" name="s" value="<%=request("s")%>">-->
        '			<input type="hidden" name="owner_uid" value="<%=aTerminals(i,0)%>">
        '			<input type="hidden" name="terminalNumber" value="<%=aTerminals(i,2)%>">
        '			<input type="hidden" name="uid" value="<%=uid%>">
        '			<input type="hidden" name="cid" value="<%=cid%>">
        '			<input type="hidden" name="vid" value="<%=vid%>">
        '			<input type="submit" name="action" value="Change PIN">

        '			</td>
        '			</tr>
        '			</form>

        '<%	NEXT%>

    End Sub
    Private Sub changepin()
        '       If Request("action") = "Change PIN" Then
        '           terminalNumber = safestring(Request("terminalNumber"))
        '           pin = safestring(Request("pin"))
        '           suid = aUserSession(cUSER_ID)
        '           vid = safestring(Request("vid"))
        '           uid = safestring(Request("uid"))
        '           cid = safestring(Request("cid"))
        '           If Request("length").count > 0 Then
        '               pinlength = safestring(Request("length"))
        '               pintype = safestring(Request("type"))
        '           End If
        '           oupd = CreateObject("viaUserManagement.UserManagement")
        '           oupd.DBConnectString = Application("DSN")
        '           oupd.pinlength = pinlength
        '           oupd.pintype = pintype
        '           oupd.SESSION_USER_ID = aUserSession(cUSER_ID)
        '           oupd.SESSION_VIAKLIX_ID = aUserSession(cVIAKLIX_ID)
        '           oupd.SESSION_COMPANY_ID = aUserSession(cCOMPANY_ID)
        '           '-----	BW 1/16/02 server ip, server time, and source ip auditing
        '           oupd.ServerIP = safestring(Request.ServerVariables("LOCAL_ADDR"))
        '           oupd.ServerTime = safestring(Now())
        '           oupd.SourceIP = safestring(Request.ServerVariables("REMOTE_ADDR"))
        '           '-----	end server ip, server time, and source ip auditing
        '           newpin = oupd.UpdateTerminalAssoc(suid, vid, CInt(cid), terminalNumber, pin)
        '           If newpin <> "" Then
        '               NotifyMsg = "PIN number: " & pin & " susccessfully changed to new PIN: " & newpin & "."
        '           Else
        '               Msg = "PIN number update failed."
        '           End If
        'end if%>


    End Sub
End Class
